//定义page 接口
//设置分页数
trait Page {
    fn set_page(&self, p: i32) {
        println!("Page Default :{}", p);
    }
}
//设置显示多少条
trait PageSize {
    fn set_page_size(&self, num: i32) {
        println!("PageSize Default :{}", num);
    }
}
struct MyPaginate {
    page: i32,
}
//跳转
trait SkipPaginate: Page + PageSize {
    fn set_skipe_page(&self, num: i32) {
        println!("SkipPaginate  :{}", num);
    }
}

impl Page for MyPaginate {}
impl PageSize for MyPaginate {}
impl<T: Page + PageSize> SkipPaginate for T {}
fn main() {
    let my_paginate = MyPaginate { page: 1 };
    my_paginate.set_page(3);
    my_paginate.set_page_size(20);
    my_paginate.set_skipe_page(33);
}
